import cv2


img = cv2.imread("C:\\Users\\86191\\Pictures\\Saved Pictures\\Camera Roll\\kc.jpg")
# 按90°旋转
new1 = cv2.rotate(img,cv2.ROTATE_90_CLOCKWISE)
# 按180°旋转
new2  = cv2.rotate(img,cv2.ROTATE_180)
# 按逆时针旋转90°
new3 = cv2.rotate(img,cv2.ROTATE_90_COUNTERCLOCKWISE)
cv2.imshow('img',img)
cv2.imshow('new1',new1)
cv2.imshow('new2',new2)
cv2.imshow('new3',new3)
cv2.waitKey(0)